import request from '@/utils/request'

// 获取角色列表'
export const reqGetRolesList = params => request('/sys/role', { params })

// 新增角色
export const reqAddRole = data => request.post('/sys/role', data)

// 更新角色信息
export const reqUpdateRole = data => request({
  method: 'put',
  url: `/sys/role/${data.id}`,
  data
})

// 删除角色
export const reqDelRole = id => request({
  method: 'delete',
  url: `/sys/role/${id}`
})

// 获取角色详情
export const reqGetRoleDetail = id => request(`/sys/role/${id}`)

// 角色分配权限
export const reqAssignPers = (id, permIds) => request.put('/sys/role/assignPrem', { id, permIds })

